/*    */ package com.zimbra.cs.account.ldap.entry;
/*    */ 
/*    */ import com.zimbra.cs.account.Entry;
/*    */ import com.zimbra.cs.account.Entry.EntryType;
/*    */ import com.zimbra.cs.account.Provisioning;
/*    */ import com.zimbra.cs.mime.MimeTypeInfo;
/*    */ import java.util.Map;
/*    */ import java.util.Set;
/*    */ import java.util.TreeSet;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public abstract class LdapMimeTypeBase
/*    */   extends Entry
/*    */   implements LdapEntry, MimeTypeInfo
/*    */ {
/*    */   protected String mDn;
/*    */   
/*    */   protected LdapMimeTypeBase(Map<String, Object> attrs, Map<String, Object> defaults, Provisioning provisioning)
/*    */   {
/* 37 */     super(attrs, defaults, provisioning);
/*    */   }
/*    */   
/*    */   public Entry.EntryType getEntryType()
/*    */   {
/* 42 */     return Entry.EntryType.MIMETYPE;
/*    */   }
/*    */   
/*    */   public String getLabel() {
/* 46 */     return this.mDn;
/*    */   }
/*    */   
/*    */   public String getDN() {
/* 50 */     return this.mDn;
/*    */   }
/*    */   
/*    */   public String[] getMimeTypes() {
/* 54 */     return super.getMultiAttr("zimbraMimeType");
/*    */   }
/*    */   
/*    */   public String getHandlerClass() {
/* 58 */     return super.getAttr("zimbraMimeHandlerClass", null);
/*    */   }
/*    */   
/*    */   public boolean isIndexingEnabled() {
/* 62 */     return super.getBooleanAttr("zimbraMimeIndexingEnabled", true);
/*    */   }
/*    */   
/*    */   public String getDescription() {
/* 66 */     return super.getAttr("description", "");
/*    */   }
/*    */   
/*    */   public Set<String> getFileExtensions() {
/* 70 */     String[] extensions = super.getMultiAttr("zimbraMimeFileExtension");
/* 71 */     Set<String> extSet = new TreeSet();
/* 72 */     for (String ext : extensions) {
/* 73 */       if (ext != null) {
/* 74 */         extSet.add(ext.toLowerCase());
/*    */       }
/*    */     }
/* 77 */     return extSet;
/*    */   }
/*    */   
/*    */   public String getExtension() {
/* 81 */     return super.getAttr("zimbraMimeHandlerExtension", null);
/*    */   }
/*    */   
/*    */   public int getPriority() {
/* 85 */     return super.getIntAttr("zimbraMimePriority", 0);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/account/ldap/entry/LdapMimeTypeBase.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */